import request from '@/router/axios'; // 考核指标

// 主表列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/hg-quality/supplierchecktarget/page',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}
// 删除
export const mainRemove = (ids) => {
  return request({
    url: '/api/hg-quality/supplierchecktarget/remove',
    method: 'post',
    params: {
      ids
    }
  })
}
// 新增-编辑
export const mainSubmit = (data, type) => {
  return request({
    url: `/api/hg-quality/supplierchecktarget/${type}`,
    method: "post",
    data: data
  });
};

// 子表列表
export const getSonList = (current, size, params) => { // targetId
  return request({
    url: '/api/hg-quality/supplierchecktargetsub/page',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}
// 删除
export const sonRemove = (ids) => {
  return request({
    url: '/api/hg-quality/supplierchecktargetsub/remove',
    method: 'post',
    params: {
      ids
    }
  })
}
// 新增-编辑
export const sonSubmit = (data, type) => {
  return request({
    url: `/api/hg-quality/supplierchecktargetsub/${type}`,
    method: "post",
    data: data
  });
};